package com.sf.fy.uav.applet.operate.controller;

import com.sf.fy.uav.common.response.operational.BannerResponse;
import com.sf.fy.uav.common.utils.Rs;
import com.sf.fy.uav.rest.BannerRest;
import com.sf.fy.uav.order.controller.FeedbackRest;
import com.sf.fy.uav.rest.ActivityRest;
import com.sf.fy.uav.rest.InvitationCodeRest;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author LTQ
 */
@RestController
@Api(tags = "banner管理")
@RequestMapping("/home/banner/")
public class HomeBannerController {

    @Autowired
    private FeedbackRest feedbackRest;

    @Autowired
    private BannerRest bannerRest;

    @Autowired
    private ActivityRest activityRest;


    @Autowired
    private InvitationCodeRest invitationCodeRest;

    @Operation(tags = "获取banner", description = "获取banner")
    @GetMapping("get-banner")
    @CrossOrigin
    public Rs<List<BannerResponse>> getBanners() {
        return Rs.success(bannerRest.getBanners());
    }

}
